<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue3</title>
</head>
<body>
  <script src="./vue.js"></script>

  <div id="one">
    <img :src="'./img/'+imgsrc" @mouseover="mouseOver"
      @mouseleave="mouseLeave" >
  </div>

  <script>
    let vue=new Vue({
      el:"#one",
      data:{
        imgsrc:"a.png"
      },
      methods:{
        mouseOver(){
          this.imgsrc="b.png"
        },
        mouseLeave(){
          this.imgsrc="a.png"
        }
      }
    })
  </script>
</body>
</html>